Optimal. Leaf size=62 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a}}\right )}{\sqrt {a} f}-\frac {\cot (e+f x)}{f \sqrt {a \sin (e+f x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2716, 21, 2773, 206} \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a}}\right )}{\sqrt {a} f}-\frac {\cot (e+f x)}{f \sqrt {a \sin (e+f x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 206
Rule 2716
Rule 2773
Rubi steps
\begin {align*} \int \frac {\cot ^2(e+f x)}{\sqrt {a+a \sin (e+f x)}} \, dx &=-\frac {\cot (e+f x)}{f \sqrt {a+a \sin (e+f x)}}+\frac {\int \frac {\csc (e+f x) \left (-\frac {a}{2}-\frac {1}{2} a \sin (e+f x)\right )}{\sqrt {a+a \sin (e+f x)}} \, dx}{a}\\ &=-\frac {\cot (e+f x)}{f \sqrt {a+a \sin (e+f x)}}-\frac {\int \csc (e+f x) \sqrt {a+a \sin (e+f x)} \, dx}{2 a}\\ &=-\frac {\cot (e+f x)}{f \sqrt {a+a \sin (e+f x)}}+\frac {\operatorname {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{f}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {a} f}-\frac {\cot (e+f x)}{f \sqrt {a+a \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.32, size = 138, normalized size = 2.23 \[ \frac {\left (\tan \left (\frac {1}{2} (e+f x)\right )+1\right ) \csc \left (\frac {1}{4} (e+f x)\right ) \sec \left (\frac {1}{4} (e+f x)\right ) \left (2 \sin \left (\frac {1}{2} (e+f x)\right )-2 \cos \left (\frac {1}{2} (e+f x)\right )+\sin (e+f x) \left (\log \left (-\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )+1\right )-\log \left (\sin \left (\frac {1}{2} (e+f x)\right )-\cos \left (\frac {1}{2} (e+f x)\right )+1\right )\right )\right )}{8 f \sqrt {a (\sin (e+f x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.43, size = 263, normalized size = 4.24 \[ \frac {{\left (\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 1\right )} \sin \left (f x + e\right ) - 1\right )} \sqrt {a} \log \left (\frac {a \cos \left (f x + e\right )^{3} - 7 \, a \cos \left (f x + e\right )^{2} + 4 \, {\left (\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 3\right )} \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right ) - 3\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} - 9 \, a \cos \left (f x + e\right ) + {\left (a \cos \left (f x + e\right )^{2} + 8 \, a \cos \left (f x + e\right ) - a\right )} \sin \left (f x + e\right ) - a}{\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 1}\right ) + 4 \, \sqrt {a \sin \left (f x + e\right ) + a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )}}{4 \, {\left (a f \cos \left (f x + e\right )^{2} - a f - {\left (a f \cos \left (f x + e\right ) + a f\right )} \sin \left (f x + e\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.69, size = 103, normalized size = 1.66 \[ -\frac {\left (1+\sin \left (f x +e \right )\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, \left (-\arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}}{\sqrt {a}}\right ) a \sin \left (f x +e \right )+\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\right )}{a^{\frac {3}{2}} \sin \left (f x +e \right ) \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cot \left (f x + e\right )^{2}}{\sqrt {a \sin \left (f x + e\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {{\mathrm {cot}\left (e+f\,x\right )}^2}{\sqrt {a+a\,\sin \left (e+f\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cot ^{2}{\left (e + f x \right )}}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________